package com.kuaimacode.kframework.api.config;

import com.kuaimacode.kframework.json.AppolloJsonUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

/**
 * @author qinyong
 * @Title:
 * @Package com.kuaimacode.kframework.api.config
 * @Description: created by IntelliJ IDEA
 * @date 2019-04-04 10:04
 */
@Configuration
public class ApplicationConfig {

    @Bean
    public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
        MappingJackson2HttpMessageConverter httpMessageConverter = new MappingJackson2HttpMessageConverter();
        httpMessageConverter.setObjectMapper(AppolloJsonUtil.getMapper());
        return httpMessageConverter;
    }
}
